//
//  YFSensorAboutController.m
//  SquashSpark
//
//  Created by Coollang on 2018/1/4.
//  Copyright © 2018年 Coollang-YF. All rights reserved.
//

#import "YFSensorAboutController.h"

@interface YFSensorAboutController ()
@property (nonatomic, strong) UIScrollView *scollView;
@property (nonatomic, strong) UIImageView *imageView;
@end

@implementation YFSensorAboutController

- (void)viewDidLoad {
    [super viewDidLoad];
    //Do any additional setup after loading the view.
    self.automaticallyAdjustsScrollViewInsets = NO;
    adjustsScrollViewInsets_NO(self.scollView, self);
    [self initUpUi];
    self.title = @"About Equipment";
}

- (void)initUpUi {
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    scrollView.backgroundColor = kBgThemeColor;
    self.view.backgroundColor = kBgThemeColor;
    UIImage *image = [UIImage imageNamed:@"sensor_abour"];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
    [imageView sizeToFit];
    CGFloat scale = image.size.height / image.size.width;
    imageView.frame = CGRectMake(0, 0, scrollView.bounds.size.width, scrollView.bounds.size.width * scale);
    [scrollView addSubview:imageView];
    scrollView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height + 64);
    [self.view addSubview:scrollView];
    self.scollView = scrollView;
    self.imageView = imageView;
}



@end
